<div class="input-group form-json-group">
    <div class="form-json-group-demo">
        <div class="input-group form-json-item">
            <span class="input-group-btn input-group-prepend">
		        <button class="btn btn-info" type="button">{{$keyName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_key][]" placeholder="{{$keyName}}" class="form-control {{$class}}" disabled>
            <span class="input-group-btn input-group-prepend input-group-append">
                <button class="btn btn-info" type="button">{{$valueName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_value][]" placeholder="{{$valueName}}" class="form-control {{$class}}" disabled>
            {{if !$disabled && !$readonly}}
            <span class="input-group-btn input-group-append">
                <button class="btn btn-danger form-json-delete" type="button">&times;</button>
            </span>
            {{/if}}
        </div>
    </div>
    <div class="form-json-group-core">
        {{if count($value) <1 }}
        <div class="input-group form-json-item">
            <span class="input-group-btn input-group-prepend">
	        	<button class="btn btn-info" type="button">{{$keyName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_key][]" placeholder="{{$keyName}}" class="form-control {{$class}}"
                   {{$disabled ? 'disabled="disabled"':''}} {{$readonly ? 'readonly="readonly"':''}}>
            <span class="input-group-btn input-group-prepend input-group-append">
                 <button class="btn btn-info" type="button">{{$valueName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_value][]" placeholder="{{$valueName}}" class="form-control {{$class}}"
                   {{$disabled ? 'disabled="disabled"':''}} {{$readonly ? 'readonly="readonly"':''}}>
            {{if !$disabled && !$readonly}}
            <span class="input-group-btn input-group-append">
                <button class="btn btn-danger form-json-delete" type="button">&times;</button>
            </span>
            {{/if}}
        </div>
        {{else/}}
        {{foreach $value as $k=>$v}}
        <div class="input-group form-json-item">
            <span class="input-group-btn input-group-prepend">
	        	<button class="btn btn-info" type="button">{{$keyName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_key][]" placeholder="{{$keyName}}" class="form-control {{$class}}" value="{{$k}}"
                   {{$disabled ? 'disabled="disabled"':''}} {{$readonly ? 'readonly="readonly"':''}}>
            <span class="input-group-btn input-group-prepend input-group-append">
                 <button class="btn btn-info" type="button">{{$valueName}}</button>
            </span>
            <input type="text" name="{{$name}}[json_value][]" placeholder="{{$valueName}}" class="form-control {{$class}}" value="{{$v}}"
                   {{$disabled ? 'disabled="disabled"':''}} {{$readonly ? 'readonly="readonly"':''}}>
            {{if !$disabled && !$readonly}}
            <span class="input-group-btn input-group-append">
                <button class="btn btn-danger form-json-delete" type="button">&times;</button>
            </span>
            {{/if}}
        </div>
        {{/foreach}}
        {{/if}}
    </div>
    {{if !$disabled && !$readonly}}
    <span class="form-json-group-add">
         <button class="btn btn-primary form-json-add" type="button">
             追加
         </button>
    </span>
    {{/if}}
</div>